package com.atguigu.spzx.service.sms.controller;

import com.atguigu.spzx.service.sms.service.SmsService;
import com.atguigu.spzx.model.common.Result;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

/**
 * title:
 * author: zgl
 * date: 2024/1/16
 * description：
 */
@RestController
@RequestMapping("/api/user/sms")
@Tag(name = "信息服务模块")
public class SmsController {
    @Resource
    private SmsService smsService;
    @GetMapping("/sendCode/{phone}")
    public Result sendCode(@PathVariable String phone, @RequestParam(required = false) Integer type) {
        smsService.sendCode(phone,type);
        return Result.ok();
    }
}
